package com.zuihai.app.mvp.model.api.service;

import com.zuihai.app.mvp.model.entity.BaseJson;
import com.zuihai.app.mvp.model.entity.FindItem;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Administrator on 2017/5/27 0027.
 */

public interface FindService {

    @FormUrlEncoded
    @POST("Toutiao_TuijianInq")
    Observable<BaseJson<FindItem>> requestHomeRecomment(@Field("page") int pageIndex,
                                                        @Field("my_id") String userId);

    @FormUrlEncoded
    @POST("Faxian_TuijianInq")
    Observable<BaseJson<FindItem>> requestFindRecomment(@Field("page") int pageIndex,
                                                        @Field("my_id") String userId);

    /**
     * 发现秘密
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<FindItem>> requestSecret(@Field("my_id") String userId,
                                                 @Field("page") int pageIndex,
                                                 @Field("type") String type);

    /**
     * 有去处
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<FindItem>> requestWhither(@Field("type")String type,@Field("my_id") String userId, @Field("page") int pageIndex);


    /**
     * 好货
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<FindItem>> requestGoods(@Field("my_id") String userId, @Field("page") int pageIndex);

    /**
     * 服务
     *
     * @param userId    用户ID
     * @param pageIndex
     * @return
     */
    @FormUrlEncoded
    @POST("TiaomuInq")
    Observable<BaseJson<FindItem>> requestService(@Field("type")String type,@Field("my_id") String userId, @Field("page") int pageIndex);


    //我的主页头条
    @FormUrlEncoded
    @POST("Zhuye_getFaxianInq")
    Observable<BaseJson<FindItem>> myHomeFindSecret(@Field("my_id") String myID,
                                                    @Field("page") int page,
                                                    @Field("yonghu_id") String userID);


    /**
     * 我的逛街
     *
     * @param myID
     * @param page
     * @param userID
     * @return
     */
    @FormUrlEncoded
    @POST("Zhuye_getGuangjieInq")
    Observable<BaseJson<FindItem>> myHomeCommodity(@Field("type")String type,@Field("my_id") String myID,
                                                   @Field("page") int page,
                                                   @Field("yonghu_id") String userID);


}
